﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using WOCBlueMarble.svr;

class ConsoleClient
{
    static ServiceClient svc;
        
    static void Main()
    {
        //테스트를 하며 작성하기...
        using (svc = new ServiceClient(new InstanceContext(new Callback())))
        {
            Console.Clear();
            string id = null;
            User[] users;
            svc.Start();
            do
            {
                id = null;
                while (id == null)
                    id = Console.ReadLine();
                users = svc.Login(id);
            } while (users == null);
            
            Console.WriteLine(users.Length+users[0].Id);
            string interprinter;
            svc.InitGame();
            
            svc.Quit();
        }
    }
    
}
class Callback : IServiceCallback
{

    #region IServiceCallback Members

    public void CallBackError(string message)
    {
        Console.WriteLine("Error:" + message);
    }

    public void CallBackMessage(string message)
    {
        Console.WriteLine("Message:" + message);
    }

    #endregion
}